<!-- 汽车组件 -->
<template>
  <div class="car-warp" @click="gotToMember">汽车</div>
</template>

<script>
import moment from 'moment';
export default {
  data() {
    return {};
  },

  components: {},

  computed: {},


  methods: {
    gotToMember() {
      if (this.$route.name != 'member') {
        console.log('我去会员中心了')
        this.$store.commit('amap/SHOW')
        this.$router.push({
          name: 'member'
        })
      }
      else{
        console.log('刷新本页面')
        // this.$router.go(0)
      }
    }
  },
};
</script>
<style lang='less' scoped>
.car-warp{
    background: rgb(100, 100, 112);
    position: fixed;
    width: 300px;
    height: 100px;
    z-index: 100;
    top:0;
    left:0
}
</style>